{% extends "WebMainSiteBundle:Course:layout.html.twig" %}
{% set title = "课程基本信息" %}
{% block title %}
    {{ title }}
{% endblock %}

{% block user_main %}
    <form class="form-horizontal" method="post" enctype="multipart/form-data">
        <div class="row">
            <div class="col-md-8">
                <div class="form-group">
                    <div class="col-md-3 text-right"><label class="control-label" for="title">课程标题:</label></div>
                    <div class="col-md-8">
                        <input
                                name="title"
                                id="title"
                                type="text"
                                class="form-control input-lg"
                                placeholder="请设置课程标题"
                                value="{% if course.title is defined %}{{ course.title }}{% endif %}"
                                />
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-3 text-right"><label class="control-label" for="category">课程分类:</label></div>
                    <div class="col-md-8">
                        <select name="category"  class="form-control input-lg">
                            {% for c in courseCategory %}<option {% if course.category == c.id %} selected="selected" {% endif %} value="{{ c.id }}">{{ c.name }}</option>{% endfor %}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-3 text-right"><label class="control-label" for="info">课程简介:</label></div>
                    <div class="col-md-8">
                        <textarea  name="info" class="form-control" rows="11" id="info" placeholder="课程简介">{% if course.info is defined %}{{ course.info }}{% endif %}</textarea>
                    </div>
                </div>
                <p class="buttons-margin-horizontal">
                    <input type="submit" class="btn btn-theme btn-green" value="提交" />
                </p>
            </div>
        </div>
    </form>
{% endblock %}